diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-11-20 19:40:29 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-11-20 19:40:29 +0000 |
| commit | 992336f41a4f6881f2a43e61e479f66e062609fd (patch) | |
| tree | 3d0e2019b9c2fd9cf1d9ab9c37c3634370c56908 /snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:immutableFreeVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected | |
| parent | 3f3a1f963e986fe61e353b5bdf9b1ec7fb384504 (diff) | |
Rename test to reflect it's specifically for immutable variables
Diffstat (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:immutableFreeVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected')
1 files changed, 63 insertions, 0 deletions
diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:immutableFreeVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:immutableFreeVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected new file mode 100644 index 00000000..f7d589ff --- /dev/null +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:immutableFreeVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -0,0 +1,63 @@ +Compilation unit elements: + +( + function + "shed__function__f__0" + visibility=private + locals=((param "closurePointer__0" data-ptr) (val "local__a" int) (val "local__b" int)) + return-type=int + body=( + ( + memory-load + (local "local__a") + pointer=(local "closurePointer__0") + layout=(struct (function-ptr (struct (int int)))) + offset=(1 0) + ) + ( + memory-load + (local "local__b") + pointer=(local "closurePointer__0") + layout=(struct (function-ptr (struct (int int)))) + offset=(1 1) + ) + (return (local "local__a")) + ) +) + +Locals: + * (param "local__a" int) + * (param "local__b" int) + * (val "closure__f__0" int) + * (val "closurePointer__f__0" data-ptr) + +Instructions: + +( + (alloc-heap (local "closurePointer__f__0") (struct (function-ptr (struct (int int))))) + ( + memory-store + pointer=(local "closurePointer__f__0") + layout=(struct (function-ptr (struct (int int)))) + offset=(0) + value=(function-ptr "shed__function__f__0") + ) + (data-ptr-to-int (local "closure__f__0") (local "closurePointer__f__0")) + ( + memory-store + pointer=(local "closurePointer__f__0") + layout=(struct (function-ptr (struct (int int)))) + offset=(1 0) + value=(local "local__a") + ) + ( + memory-store + pointer=(local "closurePointer__f__0") + layout=(struct (function-ptr (struct (int int)))) + offset=(1 1) + value=(local "local__b") + ) +) + +Temporary stack: + * closure__f__0 |
